import http from "../request.js"
// 护士端问题答案列表
export function getAllQuestionTemplates(appType, page, pageSize) {
	return http({
		url: '/nurse/onlineCustomerService/getAllQuestionTemplates?appType=' +
			appType + '&page=' + page + '&pageSize=' + pageSize,
		method: "GET",
	})
}
// 护士端获取聊天记录
export function getChatHistory(lastId, pageSize, receiverId, userId) {
	return http({
		url: '/nurse/onlineCustomerService/getChatHistory?lastId=' +
			lastId + '&pageSize=' + pageSize + '&receiverId=' + receiverId + '&userId=' +
			userId,
		method: "GET",
	})
}
// 获取全部消息列表
export function getMessagesList(customerId, pageNum, pageSize) {
	return http({
		url: '/nurse/onlineCustomerService/getMessagesList?customerId=' + customerId + '&pageNum=' +
			pageNum + '&pageSize=' +
			pageSize,
		method: "GET",
	})
}
// 标记消息为已读
export function markMessagesAsRead(chatId, receiverId) {
	return http({
		url: '/nurse/onlineCustomerService/markMessagesAsRead?chatId=' +
			chatId + '&receiverId=' + receiverId,
		method: "GET",
	})
}
// 发送消息并处理自动回复
export function sendMessageKefu(data) {
	return http({
		url: '/nurse/onlineCustomerService/sendMessage',
		method: "POST",
		data: data
	})
}
// 根据id获取问题模版
export function getQuestionTemplateById(id) {
	return http({
		url: '/nurse/onlineCustomerService/getQuestionTemplateById?id=' + id,
		method: "GET",
	})
}